package com.ruoyi.piliangfahuo.mapper;

import java.util.List;
import com.ruoyi.piliangfahuo.domain.OrderDeliveryRel;

/**
 * 订单-发货关联Mapper接口
 * 
 * @author ruoyi
 * @date 2025-01-10
 */
public interface OrderDeliveryRelMapper 
{
    /**
     * 查询订单-发货关联
     * 
     * @param id 订单-发货关联主键
     * @return 订单-发货关联
     */
    public OrderDeliveryRel selectOrderDeliveryRelById(Long id);

    /**
     * 查询订单-发货关联列表
     * 
     * @param orderDeliveryRel 订单-发货关联
     * @return 订单-发货关联集合
     */
    public List<OrderDeliveryRel> selectOrderDeliveryRelList(OrderDeliveryRel orderDeliveryRel);

    /**
     * 根据订单号查询关联的发货记录
     * 
     * @param orderId 订单编号
     * @return 发货记录ID列表
     */
    public List<Long> selectDeliveryIdsByOrderId(String orderId);

    /**
     * 根据发货记录ID查询关联的订单
     * 
     * @param deliveryId 发货记录ID
     * @return 订单编号列表
     */
    public List<String> selectOrderIdsByDeliveryId(Long deliveryId);

    /**
     * 新增订单-发货关联
     * 
     * @param orderDeliveryRel 订单-发货关联
     * @return 结果
     */
    public int insertOrderDeliveryRel(OrderDeliveryRel orderDeliveryRel);

    /**
     * 批量新增订单-发货关联
     * 
     * @param orderDeliveryRelList 订单-发货关联列表
     * @return 结果
     */
    public int insertOrderDeliveryRelBatch(List<OrderDeliveryRel> orderDeliveryRelList);

    /**
     * 修改订单-发货关联
     * 
     * @param orderDeliveryRel 订单-发货关联
     * @return 结果
     */
    public int updateOrderDeliveryRel(OrderDeliveryRel orderDeliveryRel);

    /**
     * 删除订单-发货关联
     * 
     * @param id 订单-发货关联主键
     * @return 结果
     */
    public int deleteOrderDeliveryRelById(Long id);

    /**
     * 根据订单号删除关联
     * 
     * @param orderId 订单编号
     * @return 结果
     */
    public int deleteOrderDeliveryRelByOrderId(String orderId);

    /**
     * 根据发货记录ID删除关联
     * 
     * @param deliveryId 发货记录ID
     * @return 结果
     */
    public int deleteOrderDeliveryRelByDeliveryId(Long deliveryId);

    /**
     * 批量删除订单-发货关联
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteOrderDeliveryRelByIds(Long[] ids);
}
